#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main(){
	int a = 0;
	double s = 0;
	scanf("%d", &a);

	if (a<0){
		printf("Invalid Value!");
	}
	else{
		if (a <= 50)
			s = a*0.53;
		else
			s = 50 * 0.53 + (a - 50)*0.58;
		printf("cost = %.2lf", s);
	}

	return 0;
}